package com.flushbonading.service.impl;

import cn.hutool.crypto.SecureUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.flushbonading.pojo.Teacher;
import com.flushbonading.mapper.TeacherMapper;
import com.flushbonading.pojo.dto.TeacherDTO;
import com.flushbonading.service.ITeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zlx
 * @since 2021-04-07
 */
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements ITeacherService {
    @Autowired
    private TeacherMapper teacherMapper;
    /**
     * 通过教师号得到教师名
     * @param teacher_id 教师工号
     * @return 返回教师名
     * **/
    @Override
    public String getNameByTeacherId(String teacher_id) {
        return teacherMapper.getNameByTeacherId(teacher_id);
    }

    @Override
    public List<TeacherDTO> getAllTeacher() {
        return teacherMapper.getAllTeacher();
    }
}
